# Version 1.0.0
FROM openjdk:17

# Author.
MAINTAINER lshlmy

ADD ./build/libs/gateway-1.0.0.jar app.jar

ENV JAVA_OPTS="$JAVA_OPTS -Xmx512M -Xms256M"

ENV SERVER_PORT=8080

ENV NACOS_DISCOVERY_SERVER=140.246.117.69:8848 \
    NACOS_DISCOVERY_NAMESPACE=52a9ba10-cbc8-4a6a-8341-559efed8b7a9 \
    NACOS_CONFIG_SERVER=140.246.117.69:8848 \
    NACOS_CONFIG_NAMESPACE=52a9ba10-cbc8-4a6a-8341-559efed8b7a9

ENTRYPOINT java ${JAVA_OPTS} -Dfile.encoding=UTF8 -Duser.timezone=GMT+08 -Dserver.port=${SERVER_PORT} \
    -Dnacos.discovery.server=${NACOS_DISCOVERY_SERVER} -Dnacos.discovery.namespace=${NACOS_DISCOVERY_NAMESPACE} \
    -Dnacos.config.server=${NACOS_CONFIG_SERVER} -Dnacos.config.namespace=${NACOS_CONFIG_NAMESPACE} \
    -jar app.jar